// File:    Cliente.cs
// Author:  Lucas Bittencourt
// Created: quarta-feira, 16 de novembro de 2011 18:32:47
// Purpose: Definition of Class Cliente

using System;
using System.Text;

namespace DA_OOMModel
{
   public class Cliente
   {
       public Cliente()
       {
       }

       private int cliIdCliente;
       private bool cliChAtivo;

       private Iesi.Collections.ISet usuario;
      
      /// <summary>
      /// Property for collection of Usuario
      /// </summary>
      /// <pdGenerated>Default opposite class collection property</pdGenerated>
      public virtual Iesi.Collections.ISet Usuario
      {
         get
         {
            return usuario;
         }
         set
         {
            this.usuario = value;         
         }
      }
      private Iesi.Collections.ISet contaBancaria;
      
      /// <summary>
      /// Property for collection of ContaBancaria
      /// </summary>
      /// <pdGenerated>Default opposite class collection property</pdGenerated>
      public virtual Iesi.Collections.ISet ContaBancaria
      {
         get
         {
            return contaBancaria;
         }
         set
         {
            this.contaBancaria = value;         
         }
      }
      private Iesi.Collections.ISet tituloFinanceiro;
      
      /// <summary>
      /// Property for collection of TituloFinanceiro
      /// </summary>
      /// <pdGenerated>Default opposite class collection property</pdGenerated>
      public virtual Iesi.Collections.ISet TituloFinanceiro
      {
         get
         {
            return tituloFinanceiro;
         }
         set
         {
            this.tituloFinanceiro = value;         
         }
      }
      private Pessoa pessoa;
      
      /// <summary>
      /// Property for Pessoa
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual Pessoa Pessoa
      {
         get
         {
            return pessoa;
         }
         set
         {
               this.pessoa = value;
         }
      }
   
      /// <summary>
      /// Get value of property CliIdCliente.
      /// </summary>
      public virtual int CliIdCliente
      {
         get
         {
            return cliIdCliente;
         }
         set
         {
            if (this.cliIdCliente != value)
               this.cliIdCliente = value;
         }
      }
      
      /// <summary>
      /// Get value of property CliChAtivo.
      /// </summary>
      public virtual bool CliChAtivo
      {
         get
         {
            return cliChAtivo;
         }
         set
         {
            if (this.cliChAtivo != value)
               this.cliChAtivo = value;
         }
      }
   
      /// <summary>
      /// Get and set primary key class
      /// </summary>
      public virtual ClientePK ClientePK
      {
         get 
         {
            return new ClientePK(cliIdCliente);
         }
         set
         {
            if (value != null)
            {
               this.cliIdCliente = value.CliIdCliente;
            }
         }
      }
   
      /// <summary>
      /// Get hash code
      /// </summary>
      /// <pdGenerated>Get hash code</pdGenerated>
      public override int GetHashCode()
      {
         int _hashCode = 0;
         _hashCode = 29 * ClientePK.GetHashCode();
         _hashCode += 29 * cliChAtivo.GetHashCode();
         return _hashCode;
      }
   
      /// <summary>
      /// Test if two objects are equal
      /// </summary>
      /// <param name="object">Object to compare</param>
      /// <pdGenerated>Test if two objects are equal</pdGenerated>
      public override bool Equals(object obj)
      {
         if (obj == null)
            return false;
         Cliente cast = obj as Cliente;
         if (!(obj is Cliente))
            return false;
         if (!this.ClientePK.Equals(cast.ClientePK))
            return false;
         if (this.cliIdCliente != cast.CliIdCliente)
            return false;
         if (this.cliChAtivo != cast.CliChAtivo)
            return false;
      
         return true;
      }
   
      /// <summary>
      /// Get object in string format
      /// </summary>
      /// <pdGenerated>Get object in string format</pdGenerated>
      public override string ToString()
      {
         StringBuilder ret = new StringBuilder();
         ret.Append( "Cliente: " );
         ret.Append( "CliIdCliente='" + cliIdCliente.ToString() + "'");
         ret.Append( "CliChAtivo='" + cliChAtivo.ToString() + "'");
         return ret.ToString();
      }
   
   }
}